package com.common.models;

import java.util.HashMap;
import java.util.Map;

/**
 * 短信类型
 * @author mu
 *
 */
public enum SmsTypeEnum {
	
	SEND_LOGIN("1", "SEND_LOGIN"),//1手机号验证码登录
	SEND_BIND_MOBILE("2", "SEND_BIND_MOBILE"),//2绑定手机号
	SEND_INVITE_REGISTER("3", "SEND_INVITE_REGISTER"),//3邀请注册
	SEND_REGISTER_SUCCESS("4", "SEND_REGISTER_SUCCESS"),//4注册成功
	SEND_PAID_SUCCESS("5", "SEND_PAID_SUCCESS"),//5支付成功
	SEND_UNPAID_CANCLE_SUCCESS("6", "SEND_UNPAID_CANCLE_SUCCESS"),//6未支付取消订单成功
	SEND_PAID_CANCLE_SUCCESS("7", "SEND_PAID_CANCLE_SUCCESS"),//7已支付房屋退订
	SEND_COMPLETE_RETURN_DEPOSIT_SUCCESS("8", "SEND_COMPLETE_RETURN_DEPOSIT_SUCCESS"),//8订单完成退还押金
	;
	private String code;
	private String key;

	private SmsTypeEnum(String code, String key) {
		this.code = code;
		this.key = key;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getKey() {
		return key;
	}

	public void setKey(String key) {
		this.key = key;
	}

	public static Map<String, SmsTypeEnum> getViewMap() {
		Map<String, SmsTypeEnum> ope = new HashMap<String, SmsTypeEnum>();
		for (SmsTypeEnum ste :SmsTypeEnum.values()) {
			ope.put(ste.getCode(), ste);
		}
		return ope;
	}
}
